﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Funds.Export.aspx.cs" Inherits="_FundsExport"
    EnableEventValidation="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <style type="text/css">
        .thheader{
        font-weight:bold;vertical-align:middle;text-align:center;
        font-size:11px;
        border:1px solid #ccc !important;
        line-height: 7px !important;;
        }
        .totalamount{
        font-weight:bold;
        }
    </style>
    <style type="text/css">
        html {
                font-size: 100%;
                height: 100%;
                margin-bottom: 1px; /* Always show a scrollbar to avoid jumping when the scrollbar appears  */
                }

        body {
                font-family: Arial, Helvetica, sans-serif;
                color: #555;
                background: #fff;
                font-size: 12px;
                }
        a        { color: #57a000; text-decoration: none; }
        a:hover     { color: #000; }
        a:active     { color: #777; }
        a:focus     { outline: 1px; }
        table{border-collapse:collaspe;border:1px solid #fff;border-bottom:1px solid #fff;border-right:1px solid #fff;border-left:1px solid #fff;}
        td {border-collapse: collapse;border:1px solid #fff;border-bottom:1px solid #fff;border-right:1px solid #fff;border-left:1px solid #fff;}
        .normal {border-collapse: collapse;border:1px solid #fff;}
        table.adminlistprint {
            background-color: #fff;
            border-collapse: collapse;
            border-left: 1px solid #CCCCCC;
            border-top: 1px solid #CCCCCC;
            border-right: 1px solid #CCCCCC;
            border-bottom: 1px solid #CCCCCC;
            color: #666666;
            font-size: 12px;
            width: 100%;
        }
        table.adminlistprint td, table.adminlistprint th {
            padding: 3px !important;
            background-color: #fff;
        }
        table.adminlistprint td, table.adminlistprint th  {
            border-bottom: 1px solid #CCCCCC;
            border-right: 1px solid #CCCCCC;
            border-left: 1px solid #CCCCCC;
        }
        table.adminlistprint thead, table.adminlistprint th {
            padding: 3px !important;
            background-color: #ECECEC;
        }
        @media screen, projection{
	span.pseudolink
	{
		color:Blue;
		text-decoration:underline;
		font-size:10pt;
		font-family:Tahoma;
		cursor:hand
	}
	header, footer
	{
		display:none
	}

        @media print{
	        span.pseudolink
	        {
		        display:none
	        }
	        header, footer
	        {
		        display:none
	        }
        }
        .hideifnoscript {
	        display: none
        }
        .wrapword{
        white-space: -moz-pre-wrap !important;  /* Mozilla, since 1999 */
        white-space: -pre-wrap;      /* Opera 4-6 */
        white-space: -o-pre-wrap;    /* Opera 7 */
        white-space: pre-wrap;       /* css-3 */
        word-wrap: break-word;       /* Internet Explorer 5.5+ */
        word-break: break-all;
        white-space: normal;


        }
    </style>
</head>
<body>
    <div id="body-wrapper">
        <div id="main-content1">
            <div class="clear">
            </div>
            <div class="content-box">
                <form id="frmEdit" runat="server">
                    <div class="content-box-header">
                        <h2>
                            SỔ QUỸ
                            <%=Province %>
                        </h2>
                        <asp:Repeater ID="rptData" runat="server">
                            <ItemTemplate>
                                <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'"
                                    fundsid='<%#Eval("ID") %>'>
                                    <td>
                                        <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                    </td>
                                    <td editable="true" code="CreateDate">
                                        <%# DataBinder.Eval(Container.DataItem, "CreateDate")%>
                                    </td>
                                    <td editable="true" code="FileNumber" completesource="vFileNumber" class="wrapword">
                                        <%# DataBinder.Eval(Container.DataItem, "FileNumber")%>
                                    </td>
                                    <td editable="true" code="PaymentSubject">
                                        <%# DataBinder.Eval(Container.DataItem, "PaymentSubject")%>
                                    </td>
                                    <td editable="true" code="Description" class="wrapword">
                                        <%# DataBinder.Eval(Container.DataItem, "Description")%>
                                    </td>
                                    <td editable="true" code="BankName">
                                        <%# DataBinder.Eval(Container.DataItem, "BankName")%>
                                    </td>
                                    <td editable="true" code="ReciprocalAccount_Had">
                                        <%# DataBinder.Eval(Container.DataItem, "ReciprocalAccount_Had")%>
                                    </td>
                                    <td editable="true" code="ReciprocalAccount_Debt">
                                        <%# DataBinder.Eval(Container.DataItem, "ReciprocalAccount_Debt")%>
                                    </td>
                                    <td editable="true" code="CashVND_Thu">
                                        <%# DataBinder.Eval(Container.DataItem, "CashVND_Thu")%>
                                    </td>
                                    <td editable="true" code="CashVND_Chi">
                                        <%# DataBinder.Eval(Container.DataItem, "CashVND_Chi")%>
                                    </td>
                                    <td editable="true" code="CashUSD_Thu">
                                        <%# DataBinder.Eval(Container.DataItem, "CashUSD_Thu")%>
                                    </td>
                                    <td editable="true" code="CashUSD_Chi">
                                        <%# DataBinder.Eval(Container.DataItem, "CashUSD_Chi")%>
                                    </td>
                                    <td editable="true" code="BankVND_Thu">
                                        <%# DataBinder.Eval(Container.DataItem, "BankVND_Thu")%>
                                    </td>
                                    <td editable="true" code="BankVND_Chi">
                                        <%# DataBinder.Eval(Container.DataItem, "BankVND_Chi")%>
                                    </td>
                                    <td editable="true" code="BankUSD_Thu">
                                        <%# DataBinder.Eval(Container.DataItem, "BankUSD_Thu")%>
                                    </td>
                                    <td editable="true" code="BankUSD_Chi">
                                        <%# DataBinder.Eval(Container.DataItem, "BankUSD_Chi")%>
                                    </td>
                                </tr>
                            </ItemTemplate>
                            <HeaderTemplate>
                                <table cellspacing="0" cellpadding="0" width="100%" border="1px" class="adminlistprint"
                                    editcellcontent="true">
                                    <thead>
                                        <tr>
                                            <th align="center" rowspan="3" width="30px">
                                                Index
                                            </th>
                                            <th align="center" rowspan="3" width="60px">
                                                Ngày tháng
                                            </th>
                                            <th align="center" rowspan="3" width="70px">
                                                Số File
                                            </th>
                                            <th align="center" rowspan="3" width="50px">
                                                Đối tượng
                                            </th>
                                            <th align="center" rowspan="3" width="150px">
                                                Diễn giải
                                            </th>
                                            <th align="center" rowspan="3" width="70px">
                                                Bank
                                            </th>
                                            <th align="center" rowspan="2" colspan="2">
                                                TKĐƯ
                                            </th>
                                            <th align="center" colspan="4">
                                                Tiền mặt
                                            </th>
                                            <th align="center" colspan="4">
                                                Tiền ngân hàng
                                            </th>
                                        </tr>
                                        <tr>
                                            <th align="center" colspan="2">
                                                VND
                                            </th>
                                            <th align="center" colspan="2">
                                                USD
                                            </th>
                                            <th align="center" colspan="2">
                                                VND
                                            </th>
                                            <th align="center" colspan="2">
                                                USD
                                            </th>
                                        </tr>
                                        <tr>
                                            <th align="center" width="50px">
                                                Nợ
                                            </th>
                                            <th align="center" width="50px">
                                                Có
                                            </th>
                                            <th align="center" width="50px">
                                                Thu
                                            </th>
                                            <th align="center" width="50px">
                                                Chi
                                            </th>
                                            <th align="center" width="50px">
                                                Thu
                                            </th>
                                            <th align="center" width="50px">
                                                Chi
                                            </th>
                                            <th align="center" width="50px">
                                                Thu
                                            </th>
                                            <th align="center" width="50px">
                                                Chi
                                            </th>
                                            <th align="center" width="50px">
                                                Thu
                                            </th>
                                            <th align="center" width="50px">
                                                Chi
                                            </th>
                                        </tr>
                                    </thead>
                            </HeaderTemplate>
                            <FooterTemplate>
                                <tr>
                                    <td colspan="8" style="text-align: right; padding-right: 20px !important; font-weight: 600 !important;">
                                        Tổng phát sinh</td>
                                    <td class="totalamount">
                                        <%= CashVND_Thu%>
                                    </td>
                                    <td class="totalamount">
                                        <% =CashVND_Chi%>
                                    </td>
                                    <td class="totalamount">
                                        <% =CashUSD_Thu%>
                                    </td>
                                    <td class="totalamount">
                                        <% =CashUSD_Chi%>
                                    </td>
                                    <td class="totalamount">
                                        <% =BankVND_Thu%>
                                    </td>
                                    <td class="totalamount">
                                        <% =BankVND_Chi%>
                                    </td>
                                    <td class="totalamount">
                                        <% =BankUSD_Thu%>
                                    </td>
                                    <td class="totalamount">
                                        <% =BankUSD_Chi%>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="8" style="text-align: right; padding-right: 20px !important; font-weight: 600 !important;">
                                        Số dư cuối kỳ
                                    </td>
                                    <td colspan="2" class="totalamount">
                                        <%= CashVnD_Balance%>
                                    </td>
                                    <td colspan="2" class="totalamount">
                                        <%= CashUSD_Balance%>
                                    </td>
                                    <td colspan="2" class="totalamount">
                                        <%= BankVnD_Balance%>
                                    </td>
                                    <td colspan="2" class="totalamount">
                                        <%= BankUSD_Balance%>
                                    </td>
                                </tr>
                                </TABLE>
                            </FooterTemplate>
                        </asp:Repeater>
                        <div class="clear">
                        </div>
                        <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlistprint">
                            <tr>
                                <td style="vertical-align: top;">
                                    <%if (nPermissions > 7)
                                      { %>
                                    <div class="content-box-header" style="width: 100%; margin-top: 20px;">
                                        <h3 style="cursor: s-resize;">
                                            TỔNG CỘNG CÁC QUỸ</h3>
                                        <div class="clear">
                                        </div>
                                    </div>
                                    <asp:Repeater ID="rptAllFunds" runat="server">
                                        <ItemTemplate>
                                            <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                                                <td>
                                                    <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                                </td>
                                                <td>
                                                    <%# DataBinder.Eval(Container.DataItem, "Province")%>
                                                </td>
                                                <td>
                                                    <%# DataBinder.Eval(Container.DataItem, "VNDBalance")%>
                                                </td>
                                                <td>
                                                    <%# DataBinder.Eval(Container.DataItem, "USDBalance")%>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                        <HeaderTemplate>
                                            <table cellspacing="0" cellpadding="0" border="1px" class="adminlistprint" style="width: 100%;"
                                                editcellcontent="true">
                                                <thead>
                                                    <tr>
                                                        <th>
                                                            Index</th>
                                                        <th align="center" width="350px">
                                                            Cộng toàn bộ các quỹ
                                                        </th>
                                                        <th align="center" width="150px">
                                                            VND
                                                        </th>
                                                        <th align="center" width="150px">
                                                            USD
                                                        </th>
                                                    </tr>
                                                </thead>
                                        </HeaderTemplate>
                                        <FooterTemplate>
                                            <tr>
                                                <td colspan="2" style="text-align: right; padding-right: 30px !important; font-weight: bold;">
                                                    Tổng cộng các quỹ
                                                </td>
                                                <td class="totalamount">
                                                    <%=TotalAllVND %>
                                                </td>
                                                <td class="totalamount">
                                                    <%=TotalAllUSD %>
                                                </td>
                                            </tr>
                                            </TABLE>
                                        </FooterTemplate>
                                    </asp:Repeater>
                                    <%} %>
                                </td>
                                <td width="20px;">
                                    &nbsp;</td>
                                <td style="vertical-align: top; width: 50%; margin-left: 200px;">
                                    <div class="content-box-header" style="width: 100%; margin-top: 20px;">
                                        <h3 style="cursor: s-resize;">
                                            TỔNG CỘNG THEO NGÂN HÀNG</h3>
                                        <div class="clear">
                                        </div>
                                    </div>
                                    <asp:Repeater ID="RpBalance" runat="server">
                                        <ItemTemplate>
                                            <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                                                <td>
                                                    <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                                </td>
                                                <td>
                                                    <%# DataBinder.Eval(Container.DataItem, "BankName")%>
                                                </td>
                                                <td>
                                                    <%# DataBinder.Eval(Container.DataItem, "VNDBalance")%>
                                                </td>
                                                <td>
                                                    <%# DataBinder.Eval(Container.DataItem, "USDBalance")%>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                        <HeaderTemplate>
                                            <table cellspacing="0" cellpadding="0" border="0px" class="adminlistprint" style="width: 100%;"
                                                editcellcontent="true">
                                                <thead>
                                                    <tr>
                                                        <th>
                                                            Index</th>
                                                        <th align="center" width="350px">
                                                            Tổng cộng theo ngân hàng
                                                        </th>
                                                        <th align="center" width="150px">
                                                            VND
                                                        </th>
                                                        <th align="center" width="150px">
                                                            USD
                                                        </th>
                                                    </tr>
                                                </thead>
                                        </HeaderTemplate>
                                        <FooterTemplate>
                                            </TABLE>
                                        </FooterTemplate>
                                    </asp:Repeater>
                                </td>
                            </tr>
                        </table>
                        <div class="clear">
                        </div>
                        <div id="footer">
                            <%=strPager%>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
